// 友链页面的样式，针对暗色背景优化

// 页面容器样式
.page-container {
  max-width: 1200px
  margin: 0 auto
  padding: 20px
}

// 页面头部样式
.page-header {
  text-align: center
  margin-bottom: 30px
  padding: 20px 0
  
  .page-title {
    font-size: 2.5rem
    margin-bottom: 15px
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(1, 162, 190, 0.9))
    -webkit-background-clip: text
    -webkit-text-fill-color: transparent
    background-clip: text
  }
  
  .page-description {
    max-width: 700px
    margin: 0 auto
    line-height: 1.6
    font-size: 1.1rem
    color: rgba(255, 255, 255, 0.8)
  }
}

// 友链列表样式
.friend-links {
  display: grid
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr))
  gap: 20px
  margin: 30px auto
  list-style: none
  padding: 0
  max-width: 1200px
  
  .friend-link {
    background: rgba(255, 255, 255, 0.1)
    border-radius: 8px
    overflow: hidden
    transition: all 0.3s ease
    animation: fadeInUp 0.5s ease forwards
    opacity: 0
    
    a {
      display: block
      padding: 15px
      color: #fff
      text-decoration: none
    }
    
    .friend-avatar {
      display: flex
      justify-content: center
      margin-bottom: 15px
      
      img {
        width: 80px
        height: 80px
        border-radius: 50%
        object-fit: cover
        border: 2px solid rgba(1, 162, 190, 0.5)
        transition: all 0.3s ease
      }
    }
    
    .friend-content {
      text-align: center
      
      h2 {
        font-size: 1.2rem
        margin-bottom: 8px
        color: rgba(255, 255, 255, 0.9)
      }
      
      p {
        font-size: 0.9rem
        color: rgba(255, 255, 255, 0.7)
        line-height: 1.4
      }
    }
    
    &:hover {
      transform: translateY(-5px)
      box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3)
      background: rgba(255, 255, 255, 0.15)
      
      .friend-avatar img {
        transform: rotate(360deg) scale(1.05)
        border-color: rgba(1, 162, 190, 0.8)
        box-shadow: 0 0 15px rgba(1, 162, 190, 0.5)
      }
    }
  }
}

// 添加进入动画效果
@keyframes fadeInUp {
  from {
    opacity: 0
    transform: translateY(20px)
  }
  to {
    opacity: 1
    transform: translateY(0)
  }
}

// 为每个项目设置不同的延迟
.friend-link:nth-child(1) { animation-delay: 0.1s }
.friend-link:nth-child(2) { animation-delay: 0.15s }
.friend-link:nth-child(3) { animation-delay: 0.2s }
.friend-link:nth-child(4) { animation-delay: 0.25s }
.friend-link:nth-child(5) { animation-delay: 0.3s }
.friend-link:nth-child(n+6) { animation-delay: 0.35s }

// 大屏幕：5个卡片一行
@media (min-width: 1400px) {
  .friend-links {
    grid-template-columns: repeat(5, 1fr)
  }
}

// 中等屏幕：4个卡片一行
@media (max-width: 1399px) and (min-width: 1100px) {
  .friend-links {
    grid-template-columns: repeat(4, 1fr)
  }
}

// 小屏幕：3个卡片一行
@media (max-width: 1099px) and (min-width: 768px) {
  .friend-links {
    grid-template-columns: repeat(3, 1fr)
  }
}

// 平板：2个卡片一行
@media (max-width: 767px) and (min-width: 480px) {
  .page-header {
    padding: 15px 0
    
    .page-title {
      font-size: 2rem
    }
    
    .page-description {
      font-size: 1rem
    }
  }

  .friend-links {
    grid-template-columns: repeat(2, 1fr)
  }
}

// 移动设备：1个卡片一行
@media (max-width: 479px) {
  .page-header {
    padding: 10px 0
    
    .page-title {
      font-size: 1.8rem
    }
    
    .page-description {
      font-size: 0.9rem
    }
  }

  .friend-links {
    grid-template-columns: 1fr
  }
}